package org.example.reemploymentsys.repository;


import org.example.reemploymentsys.entity.ExamQuestion;
import org.example.reemploymentsys.entity.Organization;
import org.example.reemploymentsys.entity.UserTb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface ExamQuestionRe extends JpaRepository<ExamQuestion, Long>, JpaSpecificationExecutor<ExamQuestion> {
    Page<ExamQuestion> findByUserOrOrganizationAndQuestionType(UserTb user, Organization organization,String QuestionType,PageRequest pageRequest);

    Page<ExamQuestion> findByUserOrOrganization(UserTb user, Organization organization, PageRequest pageRequest);
    List<ExamQuestion> findByUserOrOrganizationAndQuestionType(UserTb user, Organization organization,String QuestionType);

}
